import {baseUrl} from "@/config/env";

export default () => {
    return {
        submitText: '修改',
        size: 'small',
        labelWidth: 120,
        index: true,
        indexLabel: "序号",
        menuAlign: 'center',
        menuType: 'menu',
        menuPosition: "right",
        searchIndex: 1,
        searchIcon: true,
        permissionBtn: {
            addBtn: 'start:dataSource:table:add',
            editBtn: 'start:dataSource:table:edit',
            viewBtn: 'start:dataSource:table:info',
            delBtn: 'start:dataSource:table:delete',
            designBtn: 'start:dataSource:table:design',
            //下载数据模板按钮
            downloadTemplateBtn: 'start:dataSource:table:downloadTemplate',
            //数据导出按钮
            exportExcelBtn: 'start:dataSource:table:exportExcel',
            //数据导入按钮
            importExcelBtn: 'start:dataSource:table:importExcel',

        },
        column: [{
            "addDisplay": false,
            "editDisplay": false,
            "label": "主键",
            "prop": "id",
            "hide": true,
            "type": "input"
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "数据源",
            "prop": "dataSourcesKey",
            "showColumn": true,
            "type": "select",
            search: true,
            dicUrl: baseUrl + "/start/dataSource/list",
            props: {
                label: "name",
                value: "keyFlag",
            }
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "数据库名称",
            "prop": "tableSchema",
            "showColumn": true,
            "type": "input"
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "数据表名称(CN)",
            "prop": "tableComment",
            "showColumn": true,
            "type": "input"
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "数据表名称",
            "prop": "tableName",
            "showColumn": true,
            "type": "input"
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "数据表前缀",
            "prop": "tablePrefix",
            "showColumn": true,
            "type": "input"
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "包名称",
            "prop": "packageName",
            "showColumn": true,
            "type": "input"
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "插件名称",
            "prop": "moduleName",
            "showColumn": true,
            "type": "input"
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "菜单id",
            "prop": "menuParentId",
            "showColumn": true,
            "type": "input"
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "作者",
            "prop": "author",
            "showColumn": true,
            "type": "input"
        }, {
            "addDisplay": true,
            "editDisplay": true,
            "label": "表单配置",
            "prop": "crudOption",
            "showColumn": true,
            "type": "input"
        }, {
            "addDisplay": false,
            "editDisplay": false,
            "label": "创建时间",
            "prop": "createTime",
            "hide": true,
            "type": "datetime"
        }, {
            "addDisplay": false,
            "editDisplay": false,
            "label": "创建人",
            "prop": "createBy",
            "hide": true,
            "type": "input"
        }, {
            "addDisplay": false,
            "editDisplay": false,
            "label": "修改时间",
            "prop": "updateTime",
            "hide": true,
            "type": "datetime"
        }, {
            "addDisplay": false,
            "editDisplay": false,
            "label": "修改人",
            "prop": "updateBy",
            "hide": true,
            "type": "input"
        }]

    }
}
